package com.zjw

import com.zjw.entity.Person
import com.zjw.utils.JacksonUtil
import org.apache.logging.log4j.scala.Logging

object ScalaApp extends Logging {
  def main(args: Array[String]) {
    val p = Person(2,"Jerry",30,"男")
    logger.info(s"Hello ScalaApp: $p")
    val personStr = JacksonUtil.toJson(p)
    logger.info(personStr)
    val p2 = JacksonUtil.fromJson(personStr, classOf[Person])
    logger.info(p2)
  }
}
